package chap6.task2;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

/**
 * @author banana
 * 1、将当前文件example.txt拷贝到D盘根目录
2、将D盘图片拷贝到当前目录
3、将D盘mp4拷贝到当前目录

 */
public class Task6_2 {
    public Task6_2() throws Exception {
    }

    public static void main(String[] args) throws Exception {
        //输入流(源文件目录)
        FileInputStream fis=new FileInputStream("C:\\Banana\\Java内容.docx");
        FileOutputStream fos=new FileOutputStream("Java内容.docx");
        byte[] bys=new byte[1024];
        int len=0;
        while((len=fis.read(bys))!=-1){
            fos.write(bys,0,len);
        }
        fos.close();
        fis.close();
    }

}
